package com.bw.dao;

import com.bw.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/***************************
 FileAction: 用户 注册和登录 就是  增和查

 CreateTime:2022-07-29 13:48
 Author:Aaking-aline
 ****************************/
public interface UserDao {

	@Insert("insert into user values(null,#{username},#{password},#{email},#{phone})")
	void insertUser(User user);

	@Select("select * from user where username = #{username} and password = #{password}")
	List<User> selectUserByUsernameAndPassword(User user);


}
